<template>
  <div class="h-full flex items-center justify-center" :style="{ backgroundColor: token.colorBgContainer }">
    <a-result status="404" sub-title="页面不存在">
      <template #title>
        <div>404</div>
      </template>
      <template #extra>
        <a-button type="primary" @click="toHome"> 返回首页 </a-button>
      </template>
    </a-result>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { theme } from 'ant-design-vue'

const { useToken } = theme
const { token } = useToken()
const router = useRouter()
const toHome = () => {
  router.push({ path: '/' })
}
</script>
